package cn.kent.abstractFactoryPattern;

/**
 * 世界上有哪种类型的人，定义出来
 * JDK1.5引入enum是有目的的，吸引C程序员转过来
 *
 * @author kent
 * @date 2021/5/11 17:49
 */
public enum HumanEnum {
    /**
     * 把世界上所有人类型都定义出来
     */
    YellowMaleHuman("cn.kent.abstractFactoryPattern.yellowHuman.YellowMaleHuman"),
    YellowFemaleHuman("cn.kent.abstractFactoryPattern.yellowHuman.YellowFemaleHuman"),
    WhiteFemaleHuman("cn.kent.abstractFactoryPattern.whiteHuman.WhiteFemaleHuman"),
    WhiteMaleHuman("cn.kent.abstractFactoryPattern.whiteHuman.WhiteMaleHuman"),
    BlackFemaleHuman("cn.kent.abstractFactoryPattern.blackHuman.BlackFemaleHuman"),
    BlackMaleHuman("cn.kent.abstractFactoryPattern.blackHuman.BlackMaleHuman"),
    YellowDoubleSexHuman("cn.kent.abstractFactoryPattern.yellowHuman.YellowDoubleSexHuman"),
    WhiteDoubleSexHuman("cn.kent.abstractFactoryPattern.whiteHuman.WhiteDoubleSexHuman"),
    BlackDoubleSexHuman("cn.kent.abstractFactoryPattern.blackHuman.BlackDoubleSexHuman")
    ;

    private String value = "";

    /**
     * 定义构造函数，目的是Data(value)类型的相匹配
     *
     * @param value
     */
    private HumanEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return this.value;
    }

    /*
     * java enum类型尽量简单使用，尽量不要使用多态、继承等方法
     * 毕竟用Class完全可以代替enum
     */
}
